
function initialize() {
    var latlng = new google.maps.LatLng(-27.070712, -55.637196); 
    var myOptions = {
        zoom: 16,
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
    var marker = new google.maps.Marker({
        position: latlng,
        title:"CEIS",
        draggable:true,
        animation: google.maps.Animation.DROP
    });

    // To add the marker to the map, call setMap();
    marker.setMap(map); 

    // Para la animación de la marca
    google.maps.event.addListener(marker, 'click', toggleBounce);
    function toggleBounce() {
        if (marker.getAnimation() != null) {
            marker.setAnimation(null);
        } else {
            marker.setAnimation(google.maps.Animation.BOUNCE);
        }
    }
    
    //Para la info de la marca
    var contentString = '<div id="content">'+
        '<div id="siteNotice">'+
        '</div>'+
        '<h1 id="firstHeading" class="firstHeading">CEIS</h1>'+
        '<div id="bodyContent">'+
        '<p><b>C</b>omplejo <b>E</b>ducativo <b>I</b>ntegral del <b>S</b>ur</p> ' +
        '<p>Edificio Marsan Local N° 2 y 3</p>'+
        '</div>'+
        '</div>';

    var infowindow = new google.maps.InfoWindow({
        content: contentString
    });
    
    infowindow.open(map,marker);
    
    google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map,marker);
    });
}
  
function loadScript() {
    
    var meta = document.createElement("meta");
    meta.name = "viewport";
    meta.content ="initial-scale=1.0, user-scalable=no";
    document.head.appendChild(meta);
    
    var style = document.createElement("style");
    style.type = "text/css";
    style.innerHTML = " html { height: 100% } \
                        body { height: 100%; } ";
    document.head.appendChild(style);
    
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initialize";
    document.body.appendChild(script);
}
  
window.onload = loadScript;

